
<template>
  <div class="zhihu">
    <myHeader :month="month" :day="day"></myHeader>
  </div>
</template>
<script lang="ts">

import { ref, computed, onMounted, onBeforeMount, onBeforeUpdate, onUpdated, onBeforeUnmount, onUnmounted } from 'vue';
import myHeader from "./header.vue";
import utils from "../../utils/utils";
export default {
  components: {
    myHeader
  },

  setup() {
    console.log('----setup---1')
    let date = new Date()
    let month = ref(utils.formatTime(date)[1])
    let day = ref(utils.formatTime(date)[2])

    onBeforeMount(() => {console.log('----setup---onBeforeMount---4')})
    onMounted(() => {console.log('----setup---onMounted---6')})
    onBeforeUpdate(() => {console.log('----setup---onBeforeUpdate')})
    onUpdated(() => {console.log('----setup---onUpdated')})
    onBeforeUnmount(() => {console.log('----setup---onBeforeUnmount')})
    onUnmounted(() => {console.log('----setup---onUnmounted')})

    return { month, day}
  },
  beforeCreate() { console.log('page---beforeCreate---2') },
  created() { console.log('page---created---3') },
  beforeMount() { console.log('page---beforeMount---5') },
  mounted() {console.log('page---mounted---7')},
  beforeUpdate() { console.log('page---beforeUpdate') },
  updated() {console.log('page---updated') },
  beforeDestroy() {console.log('page---beforeDestroy')},
  destroyed() {console.log('page---destroyed')},
}
</script>

<style scoped lang='scss'>

</style>